//
//  JSTInterestcircleFootFrame.m
//  KYKJPackDemo
//
//  Created by 01 on 17/5/10.
//  Copyright © 2017年 ???. All rights reserved.
//

#import "JSTInterestcircleFootFrame.h"
#import "JSTInterestcircleDataModel.h"

@implementation JSTInterestcircleFootFrame

- (void)setModel:(JSTInterestcircleDataModel *)model
{
    _model = model;
    
    CGFloat replyX = kDeviceWidth/2.;
    CGFloat replyY = 0;
    CGFloat replyW = kDeviceWidth/4.;
    CGFloat replyH = kCurrentScreenWidth(35);
    self.replyFrame = CGRectMake(replyX, replyY, replyW, replyH);
    
    CGFloat fabulousX = CGRectGetMaxX(self.replyFrame);
    CGFloat fabulousY = 0;
    CGFloat fabulousW = kDeviceWidth/4.;
    CGFloat fabulousH = replyH;
    self.fabulousFrame = CGRectMake(fabulousX, fabulousY, fabulousW, fabulousH);
    
    CGSize timeSize = [NSString sizeWithString:_model.timeText font:kSystemFont(kCurrentScreenWidth(10)) CGsize:CGSizeMake(kDeviceWidth, MAXFLOAT)];
    CGFloat timeX = kCurrentScreenWidth(15);
    CGFloat timeY = (fabulousH - timeSize.height)/2.;
    self.timeFrame = (CGRect){{timeX, timeY},timeSize};
    
    // 自身frame
    CGFloat x = 0;
    CGFloat y = 0;
    CGFloat w = kDeviceWidth;
    CGFloat h = CGRectGetMaxY(self.fabulousFrame);
    self.frame = CGRectMake(x, y, w, h);
}


@end
